//
//  Copyright © 2015年 lanou3g. All rights reserved.
//

#import "ChatViewController.h"
#import <AVOSCloud/AVOSCloud.h>
@interface ChatViewController ()<UITableViewDataSource,UITableViewDelegate>
@property(nonatomic,strong)UITableView *tableview;
@end

@implementation ChatViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tableview = [[UITableView alloc]initWithFrame:self.view.bounds style:UITableViewStylePlain];
    self.tableview.backgroundColor = [UIColor clearColor];
    self.tableview.delegate =self;
    self.tableview.dataSource = self;
    [self.view addSubview:self.tableview];
    
    
    self.view.backgroundColor = [UIColor cyanColor];
    //self.navigationController.title = @"朋友";
    self.navigationItem.title = @"朋友";
    [self.tableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
    AVObject *testObject = [AVObject objectWithClassName:@"TestObject"];
    [testObject setObject:@"bar" forKey:@"foo"];
    [testObject save];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 3;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    switch (indexPath.row) {
        case 0:
            cell.textLabel.text = @"我的朋友";
            
            break;
        case 1:
            cell.textLabel.text = @"我的小组";
            
            break;
        case 2:
            cell.textLabel.text = @"附近的人";
            
            break;
            
        default:
            break;
    }
    
    return cell;
    
    
    
    
}

@end
